<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:s="http://jboss.com/products/seam/taglib"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:rich="http://richfaces.ajax4jsf.org/rich"
      xmlns:a4j="http://richfaces.org/a4j">
<body>                      
<ui:composition template="layout/console_template.xhtml">

<ui:define name="body">
    <h:form id="login">
        <rich:panel>
            <f:facet name="header">Phone</f:facet>
            <h:form>
            	<h:panelGrid id="console_grid">
            		<s:decorate id="console_text" 
		                template="frags/edit.xhtml">
		                	<ui:define name="label">Text</ui:define>
							<h:inputTextarea value="#{playListAction.text}" rows="5" cols="40">

							</h:inputTextarea>
		            </s:decorate>
            		
            		<s:decorate id="console_playDate" 
		                template="frags/edit.xhtml">
		                <ui:define name="label">Date</ui:define>
		                <div style="float:left;">
						<rich:calendar value="#{playListAction.playDate}"
		                     locale="fr/FR"
		                     popup="true" 
		                     datePattern="dd/MM/yyyy HH:mm"
		                     showApplyButton="false"
		                     isDayEnabled="true"
							 validator="#{playListAction.validatePlayDate}"
							 validatorMessage="Wrong date ! Make sure it's in the future" >
							<a4j:support event="onchanged" ajaxSingle="true" bypassUpdates="true"
	                     		reRender="console_playDate"/>
	                     </rich:calendar>
	                     </div>
	                     
		            </s:decorate>

					<a4j:commandButton value="PhoneMe" action="#{playListAction.phone}"
						  reRender="console_grid" />
					
            	</h:panelGrid>
            </h:form>
        </rich:panel>               
          
    </h:form>

 </ui:define> 
</ui:composition>

</body>

</html>
